import { request }  from '@/common/utils';

//POST 加入游戏/游戏选座
/**
   * @param {Object} playerid {
  "gameCode": "string",
  "seatNumber": 0,
  "userId": "string"
}
   */
export const entergame = playerid => request.post(`/player/enterGame`,playerid)

//POST 查询游戏详情
/**
   * @param {Object} gameid {
  "code": "string"
}
   */
export const querygamedetail = gameid => request.post(`/player/game/detail`,gameid)

//POST 录入身份
/**
   * @param {Object} playerinfo {
  "gameCode": "string",
  "gameRoleCode": "bc",
  "seatNumber": 0
}
   */
export const submitgamerole = playerinfo => request.post(`/player/game/set-role`,playerinfo)

//POST 离开游戏
/**
   * @param {Object} endinfo {
  "gameCode": "string",
  "seatNumber": 0
}
   */
export const quitgame = endinfo => request.post(`/player/leaveGame`,endinfo)